home *** CD-ROM | disk | FTP | other *** search
- property pDirection, pIncludeRolloverState, ancestor
- global gCurrentPhoto, gMasterPhotos
-
- on beginSprite me
- if pIncludeRolloverState then
- set numTrans to 3
- else
- set numTrans to 2
- end if
- set togSty to 0
- set ancestor to new(script "Bitmap But 1", the spriteNum of me, numTrans, togSty)
- end
-
- on MouseUpAction me
- repeat with n = 1 to count(gMasterPhotos)
- if getAt(gMasterPhotos, n) = gCurrentPhoto then
- exit repeat
- end if
- end repeat
- if pDirection = #next then
- set n to n + 1
- else
- set n to n - 1
- end if
- if n > count(gMasterPhotos) then
- set n to 1
- end if
- if n < 1 then
- set n to count(gMasterPhotos)
- end if
- set newName to getAt(gMasterPhotos, n)
- set gCurrentPhoto to newName
- sendAllSprites(#UpdateDetail, #photo)
- sendAllSprites(#UpdateWhatItShows)
- end
-
- on MouseEnterAction me
- nothing()
- end
-
- on MouseLeaveAction me
- nothing()
- end
-
- on getPropertyDescriptionList me
- set description to [:]
- addProp(description, #pDirection, [#default: #next, #format: #symbol, #comment: "Direction", #range: [#next, #previous]])
- addProp(description, #pIncludeRolloverState, [#default: 1, #format: #boolean, #comment: "Include Rollover State"])
- return description
- end
-
- on getBehaviorDescription me
- set endChar to offset("--END OF HEADER", the text of me)
- set endLine to the number of lines in char 1 to endChar of the text of me - 1
- set description to line 1 to endLine of the text of me
- repeat with whichLine = endLine down to 1
- if line whichLine of description = EMPTY then
- delete line whichLine of description
- end if
- end repeat
- delete line 1 of description
- return description
- end
-